﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
using SysFrame.BP;
using SysFrame.Message;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MyAppBox.Controllers
{
    public class SysPageController : BaseController
    {
        /// <summary>
        /// 通过字典分类绑定下拉
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static List<FineUICore.ListItemExtension> GetDDLitemBySys5code(string type)
        {
            List<FineUICore.ListItemExtension> listitem = new List<FineUICore.ListItemExtension>();
            List<Mssystem_4> listsys4 = new BLLsystem_4().Getsystem_4ByTypeCode(type);
            foreach (var item in listsys4)
            {
                FineUICore.ListItemExtension i = new FineUICore.ListItemExtension(new FineUICore.ListItem());
                i.Value(item.System_4_20);
                i.Text(item.System_4_40);
                listitem.Add(i);
            }
            return listitem;
        }
    }
}
